package ronglei.day01.demo06ArrayList;

import java.util.ArrayList;
import java.util.Random;

public class ArrayListAdd05 {
    public static void main(String[] args) {
        //随机数
        Random num = new Random();
        //创建Integer 集合
        ArrayList<Integer> nunList = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            nunList.add(num.nextInt(10)+1);
        }
        System.out.println(nunList);

        for (int i = 0; i < nunList.size(); i++) {
            System.out.println(nunList.get(i));
        }
    }



}
